//
//  SRSettingBaseView.m
//  SportRing
//
//  Created by Apple on 14/10/24.
//  Copyright (c) 2014年 HotOne. All rights reserved.
//

#import "SRSettingBaseView.h"

@implementation SRSettingBaseView

-(void)awakeFromNib
{
    [super awakeFromNib];
    
    [self setupButtons];
    
    @weakify(self);
    
    [[self.backBtn rac_signalForControlEvents:UIControlEventTouchUpInside]
     subscribeNext:^(id x) {
         [self_weak_.delegate didTapBackBtn];
     }];
    
    [[self.nextBtn rac_signalForControlEvents:UIControlEventTouchUpInside]
     subscribeNext:^(id x) {
         [self_weak_.delegate didTapNextBtn];
     }];
}

- (void)setupButtons
{

    LGButtonColorPair * normalColor1 = [LGButtonColorPair colorPairWithTitleColor:[UIColor whiteColor]
                                                                  backgroundColor:[UIColor colorWithRed:113.0/255.0
                                                                                                  green:183.0/255.0
                                                                                                   blue:20.0/255.0
                                                                                                  alpha:1.0f]];
    [self.nextBtn setColorPairs:@{@(LG_BUTTON_STATE_TYPE_NORMAL):normalColor1}];
    
    
    LGButtonColorPair * normalColor2 = [LGButtonColorPair colorPairWithTitleColor:[UIColor whiteColor]
                                                                  backgroundColor:[UIColor colorWithRed:218.0/255.0
                                                                                                  green:218.0/255.0
                                                                                                   blue:218.0/255.0
                                                                                                  alpha:1.0f]];
    [self.backBtn setColorPairs:@{@(LG_BUTTON_STATE_TYPE_NORMAL):normalColor2}];
}

@end
